import App from './App'
import uView from '@/uni_modules/uview-ui'
import {
	toPage
} from '@/utils/topage.js'
import {
	VueAxios
} from '@/utils/request.js'
import TencentCloudChat from '@tencentcloud/chat';
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import store from './store/index.js'
// #ifndef VUE3
import VueCompositionAPI from '@vue/composition-api';
Vue.use(VueCompositionAPI);
// #endif
Vue.prototype.$store = store
Vue.config.productionTip = false
// 公共传参跳转方法
Vue.prototype.$toPage = toPage
Vue.use(uView)
Vue.use(VueAxios)

let chat = TencentCloudChat.create({
	SDKAppID: 1600084628
}); // SDK 实例通常用 chat 表示

chat.setLogLevel(0); // 普通级别，日志量较多，接入时建议使用
// console.log("xx", chat.getTotalUnreadMessageCount());
uni.$chat=chat
//封装挂载一个消息提示框
uni.$showMsg = (title = "数据加载失败!", duration = 1500) => {
	return uni.showToast({
		title,
		duration,
		icon: 'none'

	})

}
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif